import { createRouter, createWebHistory } from 'vue-router'

const routes = [
  {
    path: '/main',
    component: () => import('../views/Main.vue'),
    children: [
      {
        path: '/home',
        name: '首页',
        component: () => import('../views/hs_home.vue'),
      },
      {
        path: '/my',
        name: 'my',
        component: () => import('../views/ZJM/My.vue'),
      },
    ],
  },
  {
    path: '/detail',
    name: '详情',
    component: () => import('../views/hs_detail.vue'),
  },
  {
    path: '/announcement',
    name: '公告',
    component: () => import('../views/hs_announcement.vue'),
  },
  {
    path: '/search',
    name: '搜索',
    component: () => import('../views/hs_search.vue'),
  },
  {
    path: '/searchdata',
    name: '搜索结果',
    component: () => import('../views/hs_searchdata.vue'),
  },
  {
    path: '/positioning',
    name: '定位',
    component: () => import('../views/hs_positioning.vue'),
  },
  {
    path: '/aichat',
    name: 'ai聊天',
    component: () => import('../views/hs_aichat.vue'),
  },
  {
    path: '/edit',
    name: 'edit',
    component: () => import('../views/ZJM/Edit.vue'),
  },
  {
    path: '/money',
    name: 'money',
    component: () => import('../views/ZJM/Money.vue'),
  },
  {
    path: '/gold',
    name: 'gold',
    component: () => import('../views/ZJM/Gold.vue'),
  },
  {
    path: '/realname',
    name: 'realname',
    component: () => import('../views/ZJM/RealName.vue'),
  },
  {
    path: '/relation',
    name: 'relation',
    component: () => import('../views/ZJM/Relation.vue'),
  },
  {
    path: '/success',
    name: 'success',
    component: () => import('../views/ZJM/Success.vue'),
  },
  {
    path: '/login',
    name: 'login',
    component: () => import('../views/Login.vue'),
  },
  {
    path: '/password',
    name: 'password',
    component: () => import('../views/Password.vue'),
  },
  {
    path: '/register',
    name: 'register',
    component: () => import('../views/Register.vue'),
  },
  {
    path: '/',
    redirect: '/login',
  },
  {
    path: '/map',
    name: 'map',
    component: () => import('../components/MapContainer.vue'),
  },
  {
    path: '/a',
    name: 'a',
    component: () => import('../components/Aa.vue'),
  },
  {
    path: '/myrelease',
    name: 'myrelease',
    component: () => import('../components/Myrelease.vue'),
  },
  {
    path: '/details/:id',
    name: 'details',
    component: () => import('../components/Details.vue'),
  },
  {
    path: '/test',
    name: 'test',
    component: () => import('../components/Test.vue'),
  },
  {
    path: '/help',
    component: () => import('../views/Help.vue'),
  },
  {
    path: '/accout_security',
    component: () => import('../views/Account_Security.vue'),
  },
  {
    path:'/Feedback_Message',
    component:()=>import('../views/Feedback_Message.vue'),
  },
]

const router = createRouter({
  history: createWebHistory(),
  routes,
})

export default router
